OpenScript is a plugin for every HTTP server compatible with W*API 1.1 (like WebSTAR or Quid Pro Quo).
It allows you to include AppleScript and Frontier commands in your HTML pages; you can also write nested commands so you can use Frontier commands inside AppleScript scripts or AppleScript commands in Frontier scripts.
Installation
To install OpenScript, follow these steps:
1) Quit WebSTAR.
2) Copy the file "OpenScript" (or OpenScript Demo) into the Plug-Ins folder in the same folder as WebSTAR.
3) Relaunch WebSTAR.
Once OpenScript is installed, all the files with the suffix ".script" are filtered.
How can I use it?
Just write the scripts inside the <Applescript>…</Applescript> or <Usertalk>…</Usertalk> TAGs, OpenScript execute them and place the result in your HTML page.
Example:
<applescript>
set pathToUse to "Macintosh HD:page.html"
set f to open for access file pathToUse
set s to read f for get eof f
return s
close access f
</applescript>
this simple script place the contents of the file"page.html" into the page you are serving.
Try to write nested TAGs in order to use the best commands of both the scripting languages (you have to append a number at the end of the TAG to specify the execution order of the scripts).